package com.tech.zhidengxian.controller;

import com.tech.zhidengxian.model.dto.GoodsDTO;
import com.tech.zhidengxian.model.dto.MessageDTO;
import com.tech.zhidengxian.model.dto.page.MyPage;
import com.tech.zhidengxian.model.dto.request.MessageRequest;
import com.tech.zhidengxian.model.dto.result.ReturnResult;
import com.tech.zhidengxian.model.dto.result.ReturnResultUtils;
import com.tech.zhidengxian.service.api.MessageService;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

@RestController
@RequestMapping("/message")
public class MessageController {
    @Resource
    private MessageService messageService;
    @RequestMapping("/pageQueryMessage")
    public ReturnResult<MyPage<MessageDTO>> pageQueryMessage(@RequestBody MessageRequest messageRequest){
        return ReturnResultUtils.returnSuccess(messageService.pageQueryMessage(messageRequest));
    }

}
